package com.quick.develop.flowable.config;

import org.flowable.spring.SpringProcessEngineConfiguration;
import org.flowable.spring.boot.EngineConfigurationConfigurer;
import org.springframework.context.annotation.Configuration;

/**
 * @author junyuan.liu
 * @version 1.0
 * @description: 
 * @date 2022/4/15 11:14
 */
@Configuration
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
    @Override
    public void configure(SpringProcessEngineConfiguration engineConfiguration) {
        engineConfiguration.setActivityFontName("宋体");
        engineConfiguration.setLabelFontName("宋体");
        engineConfiguration.setAnnotationFontName("宋体");
        // Async history configuration
//        engineConfiguration.setAsyncHistoryEnabled(true);
//        engineConfiguration.setAsyncHistoryExecutorActivate(true);
//        engineConfiguration.setAsyncHistoryExecutorNumberOfRetries(10);
        // Optional tweaking
//        engineConfiguration.setAsyncHistoryJsonGroupingEnabled(true);
//        engineConfiguration.setAsyncHistoryJsonGzipCompressionEnabled(true);
//        engineConfiguration.setAsyncHistoryJsonGroupingThreshold(10);

    }
}
